/*
 * =====================================================================================
 *
 *       Filename:  IHummerModel.cc
 *
 *    Description:
 *
 *        Version:  1.0
 *        Created:  01/10/2022 12:06:27 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  first_name last_name (fl), fl@my-company.com
 *        Company:  my-company
 *
 * =====================================================================================
 */

#include "IHummerModel.h"
#include <iostream>
using std::cout;
using std::endl;

IHummerModel::IHummerModel(void) {
}

IHummerModel::~IHummerModel(void) {
}

void IHummerModel::Run() {
    //先发动汽车
    Start();
    //引擎开始轰鸣
    EngineBoom();

    //然后就开始跑了，跑的过程中遇到一条狗挡路，就按喇叭
    if (IsAlarm()) {
        Alarm();
    }

    //到达目的地就停车
    Stop();
}

bool IHummerModel::IsAlarm() {
    //钩子方法，默认喇叭是会响的
    return true;
}
